local qingleng = fk.CreateSkill{
    name = "jinhs__qingleng",
}

Fk:loadTranslationTable{
   ["jinhs__qingleng"] = "清冷",
   [":jinhs__qingleng"] = "其他角色的回合结束时，若其体力值不大于你，你可以将一张基本牌当无距离限制的冰【杀】对其使用。",

    ["#jinhs__qingleng-invoke"] = "清冷：你可以将一张基本牌当冰【杀】对 %dest 使用",

   ["$jinhs__qingleng1"] = "冷冷清清，寂落沉沉。",
   ["$jinhs__qingleng2"] = "冷月葬情，深雪埋伤。",
}

qingleng:addEffect(fk.EventPhaseStart,{
    anim_type = "offensive",
    can_trigger = function(self, event, target, player, data)
      return target ~= player and player:hasSkill(qingleng.name) and target.phase == Player.Finish and
      not player:isKongcheng() and not player:isProhibited(target, Fk:cloneCard("ice__slash")) and target.hp <= player.hp
    end,
    on_cost = function(self, event, target, player, data)
      local card = player.room:askToCards(player,{
        min_num = 1,
        max_num = 1,
        include_equip = false,
        skill_name = qingleng.name,
        pattern = ".|.|.|hand|.|basic|.",
        prompt = "#jinhs__qingleng-invoke::"..target.id,
        cancelable = true,
      })
      if #card > 0 then
        event:setCostData(self, { card = card })
        return true
      end
    end,
    on_use = function(self, event, target, player, data)
      local room = player.room
      room:useVirtualCard("ice__slash", event:getCostData(self).card[1], player, target, qingleng.name, true)
    end,
})

return qingleng